<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Bolum Details</f:facet>

        <s:decorate id="id" template="layout/display.xhtml">
            <ui:define name="label">Id</ui:define>
            <h:outputText value="#{bolumHome.instance.id}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="bolumAdi" template="layout/display.xhtml">
            <ui:define name="label">Bolum adi</ui:define>
            <h:outputText value="#{bolumHome.instance.bolumAdi}"/>
        </s:decorate>

        <s:decorate id="bolumKodu" template="layout/display.xhtml">
            <ui:define name="label">Bolum kodu</ui:define>
            <h:outputText value="#{bolumHome.instance.bolumKodu}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/BolumEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty bolumFrom ? 'BolumList' : bolumFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Sektor</h:panelGroup>
        </f:facet>
    <div class="association" id="sektorParent">

        <h:outputText value="There is no sektor associated with this bolum."
                   rendered="#{bolumHome.instance.sektor == null}"/>

        <rich:dataTable var="_sektor"
                   value="#{bolumHome.instance.sektor}"
                rendered="#{bolumHome.instance.sektor != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="sektorTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_sektor.id}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Sektor adi</f:facet>
                <h:outputText value="#{_sektor.sektorAdi}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Sektor kodu</f:facet>
                <h:outputText value="#{_sektor.sektorKodu}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewsektor"
                     value="View"
                      view="/Sektor.xhtml">
                    <f:param name="sektorId"
                           value="#{_sektor.id}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Kullanici is tecrubeleris</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="kullaniciIsTecrubelerisChildren">

        <h:outputText value="There are no kullaniciIsTecrubeleris associated with this bolum."
                   rendered="#{empty bolumHome.kullaniciIsTecrubeleris}"/>

        <rich:dataTable value="#{bolumHome.kullaniciIsTecrubeleris}"
                       var="_kullaniciIsTecrubeleri"
                  rendered="#{not empty bolumHome.kullaniciIsTecrubeleris}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="kullaniciIsTecrubelerisTable">
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.id}">
                    <f:convertNumber/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.firmaAdi}">
                <f:facet name="header">Firma adi</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.firmaAdi}"/>
            </rich:column>
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.iseBaslamaTarihi}">
                <f:facet name="header">Ise baslama tarihi</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.iseBaslamaTarihi}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_kullaniciIsTecrubeleri.istenAyrilmaTarihi}">
                <f:facet name="header">Isten ayrilma tarihi</f:facet>
                <h:outputText value="#{_kullaniciIsTecrubeleri.istenAyrilmaTarihi}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectkullaniciIsTecrubeleri"
                     value="Select"
                      view="/KullaniciIsTecrubeleri.xhtml">
                    <f:param name="kullaniciIsTecrubeleriId"
                            value="#{_kullaniciIsTecrubeleri.id}"/>
                    <f:param name="kullaniciIsTecrubeleriFrom" value="Bolum"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add kullaniciIsTecrubeleri"
                view="/KullaniciIsTecrubeleriEdit.xhtml">
            <f:param name="bolumId"
                    value="#{bolumHome.instance.id}"/>
            <f:param name="kullaniciIsTecrubeleriFrom" value="Bolum"/>
        </s:button>
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
